package com.olt.dao.oltTest;

import com.olt.domain.oltCenter.problem.OltProblem;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;


import java.util.List;
import java.util.UUID;

public interface IOltProblem extends JpaRepository<OltProblem, String> {
    Page<OltProblem> findAllByGroupIdAndProblemTitleContainingOrderByDateDesc(String groupId, String title, Pageable pageable);

    void deleteByProblemIdIn(List<String> uuids);

    @Query(value = "select p.problemType from OltProblem  p where p.problemId=?1")
    Integer getProblemTypeByProblemId(String uuid);




}
